<?php
//curl_send.php
$uri = "http://li.aaaa.com/curl_service.php";
// 参数数组
$data = array (
        'name' => 'tanteng'
// 'password' => 'password'
);
 
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $uri );
curl_setopt ( $ch, CURLOPT_POST, 1 );
curl_setopt ( $ch, CURLOPT_HEADER, 0 );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $data );
$return = curl_exec ( $ch );
curl_close ( $ch );
 
print_r($return);



//curl_service.php
if(isset($_POST['name'])){
    if(!empty($_POST['name'])){
        echo '您好，',$_POST['name'].'！';
    }
}
?>